<!DOCTYPE html>
<!--
Auteur:Frank den Broeder
Stundentnummer:s1049444
Klas: IS1d
-->
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../../layout/mystyle.css">
        <title>Studentenlijst</title>
    </head>
   <body>
    <SPAN CLASS="text_h1">Studentenlijst</SPAN>
    <BR>
    <BR>
	//de code die ervoor zorgt dat de gegevens uit de database worden gehaald en worden getoont als studentenlijst
        <SPAN CLASS="text_normal">
            <?php
            include ($_SERVER['DOCUMENT_ROOT'].'/config/connect.php');
            $result = mysql_query("SELECT * FROM student");

            print('<table class="studentenlijst">');
            print('<tr>');
            print('<th>SN</th>');
            print('<th>Voornaam</th>');
            print('<th>Achternaam</th>');
            print('<th>Adres</th>');
            print('<th>Postcode</th>');
            print('<th>Woonplaats</th>');
            print('<th>Geslacht</th>');
            print('<th>Geboortedatum</th>');
            print('<th>Emailadres</th></tr>' );

            for($i=0; $i<mysql_num_rows($result);$i++){
                $row = mysql_fetch_assoc($result);
                print('<tr>');
                print('<td>' . $row['studentnummer'] . '</td>');
                print('<td>' . '<a href="index.php?page=studentenlijst-wijzig&sn=' . $row['studentnummer']. '">' . $row['voornaam'] . '</a></td>');
                print('<td>' . $row['achternaam'] . '</td>');
                print('<td>' . $row['adres'] . '</td>');
                print('<td>' . $row['postcode'] . '</td>');
                print('<td>' . $row['woonplaats'] . '</td>');
                print('<td>' . $row['geslacht'] . '</td>');
                print('<td>' . $row['geboortedatum'] . '</td>');
                print('<td>' . $row['emailadres'] . '</td>');
                print('</tr>');
            }
            print('</table><br/>');
            ?>
            </SPAN>
   </body>
</html>

